<div id="title_right">
	<p id="title_right_left"></p>
	<div id="title_right_center">
		<p class="chu_title">DANH SÁCH BÌNH LUẬN</p>
	</div>
	<p id="title_right_right"></p>
</div>
<?php

if($data)
{?>
<table class="table">
	<tr class="mau2">
		<td>STT</td>
		<td>Mặt hàng</td>
		<td>Họ tên</td>
		<td>Số Điện Thoại</td>
		<td>Email</td>
		<td>Thời gian</td>
		<td>Nội dung</td>
		<td>Trạng thái</td>
		<td><img src="public/images/b_edit.png" /> Sửa</td>
		<td><img src="public/images/b_drop.png" /> Xóa</td>
	</tr>

	<?php
	$i=1;

	foreach ($data['list'] as $key => $value) {

		if($i%2==0){
			echo "<tr class='mau'>";
		}else
		{
			echo "<tr>";
		}
		?>
	<td><?php echo $i;?></td>
	<td>
				<?php
				if(is_array($data['listmh'])){
					foreach ($data['listmh'] as $item){
						if($item['MaMH']==$value['MaMH']){ 
							echo $item['TenMH'];
						}
					}
				}
				?>
				</td>
	<td><?php echo $value['HoTen'];?></td>
	<td><?php echo $value['SDT'];?></td>
	<td><?php echo $value['Email'];?></td>
	<td><?php echo $value['ThoiGian'];?></td>
	<td><?php echo $value['NoiDung'];?></td>
	<td><?php
					if($value['AnHien'] == 1){
						echo 'Hiện';
					}
					else 
					{
						echo 'Ẩn';
					}
					?>
		 </td>
	<td><a href="admin.php?mod=updatebinhluan&ma=<?php echo $value['MaBL']?>">
			<img src="public/images/b_edit.png" /></a></td>
	<td><a href="admin.php?mod=delbinhluan&ma=<?php echo $value['MaBL']?>">
			<img src="public/images/b_drop.png" /> </a></td>
	</tr>
	<?php
	$i++;
	}
	?>
	<tr>
		<td colspan="8">
			<button onclick="window.location.href='admin.php?mod=addbinhluan'">Thêm mới</button></td>
	</tr>
</table>



	<?php }?>
